{extend name="extra@admin/content"} {block name="content"}
<form onsubmit="return false;" action="__SELF__" data-auto="true" method="post" class='form-horizontal' style='padding-top:20px'>
    {foreach $list as $vo} {switch name="vo.input_type"} {case value="0"}
    <!--文本输入-->
    <div class="form-group">
        <label class="col-sm-2 control-label">{$vo.title} <span class="nowrap">({$vo.name})</span></label>
        <div class='col-sm-8'>
            <input type="text" name="{$vo.name}" title="请输入{$vo.title}" placeholder="请输入{$vo.title}" value="{$vo.value}" class="layui-input">
            <p class="help-block">{$vo.remark}</p>
        </div>
    </div>
    <!--文本输入结束-->
    {/case} {case value="1"}
    <!--下拉框输入-->
    <div class="form-group">
        <label class="col-sm-2 control-label">{$vo.title} <span class="nowrap">({$vo.name})</span></label>
        <div class='col-sm-8'>
            <select name='{$vo.name}' class='layui-select' style='display:block'>
                <!--{volist name="$vo.name|dict_list" id="vv"}-->
                <!--{eq name='vv.value' value='$vo.value|default=0'}-->
                <option selected value='{$vv.value}'>{$vv.name}</option>
                <!--{else}-->
                <option  value='{$vv.value}'>{$vv.name}</option>
                <!--{/eq}-->
                <!--{/volist}-->
            </select>
            <p class="help-block">{$vo.remark}</p>
        </div>
    </div>
    <!--下拉框输入结束-->
    {/case} {case value="2"}
    <!--图片上传 上传类型后期可做动态-->
    <div class="form-group">
        <label class="col-sm-2 control-label">{$vo.title} <span class="nowrap">({$vo.name})</span></label>
        <div class='col-sm-8'>
            <img data-tips-image style="height:auto;max-height:32px;min-width:32px" src="{$vo.value}" />
            <input type="hidden" name="{$vo.name}" onchange="$(this).prev('img').attr('src', this.value)" value="{$vo.value}" class="layui-input">
            <a class="btn btn-link" data-file="one" data-type="ico,png,jpg" data-field="{$vo.name}">上传图片</a>
            <p>{$vo.remark}</p>
        </div>
    </div>
    <!--图片上传结束-->
    {/case} {case value="3"}
    <!--系统配置编辑器输入 暂时用文本域代替 目前无使用-->
    <div class="form-group">
        <label class="col-sm-2 control-label">{$vo.title} <span class="nowrap">({$vo.name})</span></label>
        <div class='col-sm-8'>
            <textarea name="{$vo.name}" class="layui-input" style="height:80px;resize:none;line-height:20px">{$vo.value}</textarea>
            <p class="help-block">{$vo.remark}</p>
        </div>
    </div>
    <!--系统配置编辑器输入结束-->
    {/case} {case value="4"}
    <!--系统配置密码框输入-->
    <div class="form-group">
        <label class="col-sm-2 control-label">{$vo.title} <span class="nowrap">({$vo.name})</span></label>
        <div class='col-sm-8'>
            <input type="password" name="{$vo.name}" title="请输入{$vo.title}" placeholder="请输入{$vo.title}" value="{$vo.value}" class="layui-input">
            <p class="help-block">{$vo.remark}</p>
        </div>
    </div>
    <!--系统配置密码框输入结束-->
    {/case} {case value="5"}
    <!--系统配置文件上传 上传类型后期可做动态-->
    <div class="form-group">
        <label class="col-sm-2 control-label">{$vo.title} <span class="nowrap">({$vo.name})</span></label>
        <div class="col-md-8">
            <div class="input-group">
                <input class="layui-input" type="text" value="{$vo.value|default=''}" name="{$vo.name}" required="required" title="请上传文件">
                <a data-file="one" data-type="apk,ipa,pfx" data-field="{$vo.name}" class="input-group-addon"><i class="fa fa-file"></i></a>
            </div>
        </div>
    </div>
    <!--系统配置文件上传结束-->
    {/case} {case value="6"}
    <!--单选按钮输入-->
    <div class="form-group">
        <label class="col-sm-2 control-label">{$vo.title} <span class="nowrap">({$vo.name})</span></label>
        <div class="col-md-8">
            <div class="mt-radio-inline" style='padding-bottom:0'>
                <!--{if !isset($vo.value) or $vo.value neq 0}-->
                <label class="layui-form-label">
                    <input data-none-auto type="radio" checked name="{$vo.name}" value="1"> 启用
                </label>
                <label class="layui-form-label">
                    <input data-none-auto type="radio" name="{$vo.name}" value="0"> 禁用
                </label>
                <!--{else}-->
                <label class="layui-form-label">
                    <input data-none-auto type="radio" name="{$vo.name}" value="1"> 启用
                </label>
                <label class="layui-form-label">
                    <input data-none-auto type="radio" checked name="{$vo.name}" value="0"> 禁用
                </label>
                <!--{/if}-->
            </div>
        </div>
    </div>
    <!--单选按钮输入结束-->
    {/case} {case value="7"}
    <!--文本域输入-->
    <div class="form-group">
        <label class="col-sm-2 control-label">{$vo.title} <span class="nowrap">({$vo.name})</span></label>
        <div class='col-sm-8'>
            <textarea name="{$vo.name}" class="layui-input" style="height:80px;resize:none;line-height:20px">{$vo.value}</textarea>
            <p class="help-block">{$vo.remark}</p>
        </div>
    </div>
    <!--文本域输入结束-->
    {/case} {/switch} {/foreach}

    <div class="hr-line-dashed"></div>

    <div class="col-sm-4 col-sm-offset-2">
        <div class="layui-form-item text-center">
            <button class="layui-btn" type="submit">保存配置</button>
        </div>
    </div>

</form>

{/block}